package com.gccloud.design.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gccloud.design.entity.SdRepoLimitTimeEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wu.yumin
 * @version 1.0.0
 * @Description 环节时限
 * @date 2021/6/29 14:24
 */
public interface SdRepoLimitDao extends BaseMapper<SdRepoLimitTimeEntity> {
    /**
     * 环节时限设置：获取当前环节的完成时限
     *
     * @param activityRepoId 环节实例标识
     * @return 列表
     */
    List<SdRepoLimitTimeEntity> getLimitTime(String activityRepoId);

    /**
     * 环节时限设置：为某个环节添加环节时限
     *
     * @param sdRepoLimitTimeEntity 环节时限配置实体
     * @return 数量
     */
    int addLimitTime(@Param("sdRepoLimitTimeEntity") SdRepoLimitTimeEntity sdRepoLimitTimeEntity);

    /**
     * 环节时限设置：为某个环节更新环节时限
     *
     * @param sdRepoLimitTimeEntity 环节时限配置实体
     * @return 数量
     */
    int updateLimitTime(@Param("sdRepoLimitTimeEntity") SdRepoLimitTimeEntity sdRepoLimitTimeEntity);

}
